package com.th.util;

import jdk.internal.dynalink.beans.StaticClass;

public class MyJson {
    private String msg;
    private Integer count;
    private Integer code;
    private Object data;

    public MyJson(String msg, Integer count, Integer code, Object data) {
        this.msg = msg;
        this.count = count;
        this.code = code;
        this.data = data;
    }

    public static MyJson ok(Object o){
        return new MyJson("",0,0,o);
    }
    public static MyJson ook(String msg){
        return new MyJson(msg,0,0,null);
    }

    public static MyJson error(String msg){
        return new MyJson(msg,0,-1,null);
    }
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
